package com.ty.day1;

import java.util.Scanner;

/**
 * Created by IntelliJ IDEA.
 * Author : txy
 * Create 2023/11/6 14:36
 */
public class Hello {
    public static void main(String[] args) {
        Student student = new Student();
        Scanner sc = new Scanner(System.in);
        String str = "姓名：";
        System.out.println("请输入学生姓名：");
        String name = sc.next();
        str = str + name + ",年龄：";
        student.setName(name);
        System.out.println("请输入学生年龄：");
        int age = sc.nextInt();
        str = str + age + ",性别：";
        student.setAge(age);
        System.out.println("请输入学生性别：");
        String sex = sc.next();
        str = str + sex + ",爱好：";
        student.setSex(sex);
        System.out.println("请输入学生爱好：");
        String hobby = sc.next();
        str = str + hobby;
        student.setHobby(hobby);
        System.out.println(student);
        System.out.println(str);
    }

}
